<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>AddPlan</title>
<link type="text/css" href="../css/redmond/jquery-ui-1.7.custom.css" rel="stylesheet" />
<script type="text/javascript" src="../script/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="../script/jquery-ui-1.7.custom.min.js"></script>
<script type="text/javascript">
    var planId = '<s:property value="planId" />';
    $(document).ready( function() {
        $("#tabs").tabs();
        $("#submit_psyj_button").click(function() {
        	var markFafwnx = parseInt($("#markFafwnx").val());
        	if (isNaN(markFafwnx) || markFafwnx > 5) {
            	alert('请填写正确的分数');
            	$("#markFafwnx").focus();
            	return false;
        	}
        	var markXmjbqklyxz = parseInt($("#markXmjbqklyxz").val());
        	if (isNaN(markXmjbqklyxz) || markXmjbqklyxz > 10) {
            	alert('请填写正确的分数');
            	$("#markXmjbqklyxz").focus();
            	return false;
        	}
        	var markFkkxxfx = parseInt($("#markFkkxxfx").val());
        	if (isNaN(markFkkxxfx) || markFkkxxfx > 15) {
            	alert('请填写正确的分数');
            	$("#markFkkxxfx").focus();
            	return false;
        	}
        	var markFkmb = parseInt($("#markFkmb").val());
        	if (isNaN(markFkmb) || markFkmb > 5) {
            	alert('请填写正确的分数');
            	$("#markFkmb").focus();
            	return false;
        	}
        	var markFkbz = parseInt($("#markFkbz").val());
        	if (isNaN(markFkbz) || markFkbz > 5) {
            	alert('请填写正确的分数');
            	$("#markFkbz").focus();
            	return false;
        	}
        	var markYfyfkcs = parseInt($("#markYfyfkcs").val());
        	if (isNaN(markYfyfkcs) || markYfyfkcs > 10) {
            	alert('请填写正确的分数');
            	$("#markYfyfkcs").focus();
            	return false;
        	}
        	var markGcsjjcs = parseInt($("#markGcsjjcs").val());
        	if (isNaN(markGcsjjcs) || markGcsjjcs > 12) {
            	alert('请填写正确的分数');
            	$("#markGcsjjcs").focus();
            	return false;
        	}
        	var markFktzggs = parseInt($("#markFktzggs").val());
        	if (isNaN(markFktzggs) || markFktzggs > 10) {
            	alert('请填写正确的分数');
            	$("#markFktzggs").focus();
            	return false;
        	}
        	var markFkxyfx = parseInt($("#markFkxyfx").val());
        	if (isNaN(markFkxyfx) || markFkxyfx > 2) {
            	alert('请填写正确的分数');
            	$("#markFkxyfx").focus();
            	return false;
        	}
        	var markGzjhap = parseInt($("#markGzjhap").val());
        	if (isNaN(markGzjhap) || markGzjhap > 10) {
            	alert('请填写正确的分数');
            	$("#markGzjhap").focus();
            	return false;
        	}
        	var markBzcs = parseInt($("#markBzcs").val());
        	if (isNaN(markBzcs) || markBzcs > 10) {
            	alert('请填写正确的分数');
            	$("#markBzcs").focus();
            	return false;
        	}
        	var markNrgejqt = parseInt($("#markNrgejqt").val());
        	if (isNaN(markNrgejqt) || markNrgejqt > 6) {
            	alert('请填写正确的分数');
            	$("#markNrgejqt").focus();
            	return false;
        	}
        	$("#markTotal").val(markFafwnx + markXmjbqklyxz + markFkkxxfx + markFkmb + markFkbz + markYfyfkcs + markGcsjjcs + markFktzggs + markFkxyfx + markGzjhap + markBzcs + markNrgejqt);
        	$("#markTotal").focus();
        	if (confirm('总分：' + $("#markTotal").val() + '，是否保存评审意见？')) {
        		savePsyj();
        	}
        });
    });
    function savePsyj() {
        $.ajax({
            type: "post",
            url:  "SavePlanResult.action",
            dataType: "json",
            data: {
                "psyj.prjPkid": planId,
                "psyj.markTotal": $("#markTotal").val(),
                "psyj.markFafwnx": $("#markFafwnx").val(),
                "psyj.markXmjbqklyxz": $("#markXmjbqklyxz").val(),
                "psyj.markFkkxxfx": $("#markFkkxxfx").val(),
                "psyj.markFkmb": $("#markFkmb").val(),
                "psyj.markFkbz": $("#markFkbz").val(),
                "psyj.markYfyfkcs": $("#markYfyfkcs").val(),
                "psyj.markGcsjjcs": $("#markGcsjjcs").val(),
                "psyj.markFktzggs": $("#markFktzggs").val(),
                "psyj.markFkxyfx": $("#markFkxyfx").val(),
                "psyj.markGzjhap": $("#markGzjhap").val(),
                "psyj.markBzcs": $("#markBzcs").val(),
                "psyj.markNrgejqt": $("#markNrgejqt").val(),
                "psyj.specificcomments": $("#specificcomments").val()
            },
            success: function(data) {
                if (data.returnCode == "success") {
                    alert('保存评审意见成功');
                    window.location.href = "ListOwnJudgingPlan.html";
                } else {
                    alert('保存评审意见失败');
                }
            }
        });
    }
</script>
<style type="text/css">
    .ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .1em .1em 0; font-size: 0.9em;}
</style>
</head>
<body>
<div id="tabs" style="padding: 0px; margin: 0px; width: 100%; border: none 0px;">
    <ul>
        <li><a href="#tabs-1">专家评审意见</a></li>
    </ul>
    <div id="tabs-1">
        <table width="100%"  border="0" cellspacing="2" cellpadding="4">
            <tr>
                <td align="left" colspan="5">总分：<input id="markTotal" type="text" readonly="readonly"/></td>
            </tr>
            <tr>
                <th width="10%" scope="row">序号</th>
                <td width="90%">评审内容</td>
                <td width="90%" colspan="2">评审要点</td>
                <td width="90%">分数</td>
            </tr>
            <tr>
                <th scope="row">1</th>
                <td>方案服务年限的确定（5分）</td>
                <td colspan="2">以采矿许可证年限为参考，开采年限低于30年的</td>
                <td><input id="markFafwnx" type="text"  /></td>
            </tr>
            <tr>
                <th rowspan="4" scope="row">2</th>
                <td rowspan="4">项目基本情况、项目区土地利用现状（10分）</td>
                <td colspan="2">&nbsp;</td>
                <td rowspan="4"><input id="markXmjbqklyxz" type="text"  /></td>
            </tr>
            <tr>
                <td colspan="2">&nbsp;</td>
            </tr>
            <tr>
                <td colspan="2">&nbsp;</td>
            </tr>
            <tr>
                <td colspan="2">&nbsp;</td>
            </tr>
            <tr>
                <th rowspan="7" scope="row">3</th>
                <td rowspan="7">土地复垦可行性分析（15分）</td>
                <td colspan="2">&nbsp;</td>
                <td rowspan="7"><input id="markFkkxxfx" type="text"  /></td>
            </tr>
            <tr>
                <td colspan="2">&nbsp;</td>
            </tr>
            <tr>
                <td colspan="2">&nbsp;</td>
            </tr>
            <tr>
                <td colspan="2">&nbsp;</td>
            </tr>
            <tr>
                <td rowspan="3">&nbsp;</td>
                <td>&nbsp;</td>
            </tr>
            <tr>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td>&nbsp;</td>
            </tr>
            <tr>
                <th scope="row">4</th>
                <td>复垦目标（5分）</td>
                <td colspan="2">&nbsp;</td>
                <td><input id="markFkmb" type="text"  /></td>
            </tr>
            <tr>
                <th scope="row">5</th>
                <td>复垦标准（5分）</td>
                <td colspan="2">&nbsp;</td>
                <td><input id="markFkbz" type="text"  /></td>
            </tr>
            <tr>
                <th rowspan="3" scope="row">6</th>
                <td rowspan="3">预防与复垦措施（10分）</td>
                <td rowspan="3">&nbsp;</td>
                <td>&nbsp;</td>
                <td rowspan="3"><input id="markYfyfkcs" type="text"  /></td>
            </tr>
            <tr>
                <td>&nbsp;</td>
            </tr>
            <tr>
                <td>&nbsp;</td>
            </tr>
            <tr>
                <th scope="row">7</th>
                <td>工程设计及测算（12分）</td>
                <td colspan="2">&nbsp;</td>
                <td><input id="markGcsjjcs" type="text"  /></td>
            </tr>
            <tr>
              <td rowspan="3">8</td>
              <td rowspan="3" align="center"><div align="left">土地复垦投资估概算（10）</div></td>
              <td colspan="2" align="center">&nbsp;</td>
              <td rowspan="3" align="center"><div align="left">
                <input id="markFktzggs" type="text"  />
              </div></td>
            </tr>
            <tr>
              <td colspan="2" align="center">&nbsp;</td>
            </tr>
            <tr>
              <td colspan="2" align="center">&nbsp;</td>
            </tr>
            <tr>
              <td>9</td>
              <td align="center"><div align="left">土地复垦效益分析（2分）</div></td>
              <td colspan="2" align="center">&nbsp;</td>
              <td align="center"><div align="left">
                <input id="markFkxyfx" type="text"  />
              </div></td>
            </tr>
            <tr>
              <td rowspan="2">10</td>
              <td rowspan="2" align="center"><div align="left">工作计划安排（10分）</div></td>
              <td rowspan="2" align="center">&nbsp;</td>
              <td align="center">&nbsp;</td>
              <td rowspan="2" align="center"><div align="left">
                <input id="markGzjhap" type="text"  />
              </div></td>
            </tr>
            <tr>
              <td align="center">&nbsp;</td>
            </tr>
            <tr>
              <td rowspan="3">11</td>
              <td rowspan="3" align="center"><div align="left">保障措施（10分）</div></td>
              <td colspan="2" align="center">&nbsp;</td>
              <td rowspan="3" align="center"><div align="left">
                <input id="markBzcs" type="text"  />
              </div></td>
            </tr>
            <tr>
              <td colspan="2" align="center">&nbsp;</td>
            </tr>
            <tr>
              <td colspan="2" align="center">&nbsp;</td>
            </tr>
            <tr>
              <td>12</td>
              <td align="center"><div align="left">内容格式及其他（6分）</div></td>
              <td colspan="2" align="center">&nbsp;</td>
              <td align="center"><div align="left">
                <input id="markNrgejqt" type="text"  />
              </div></td>
            </tr>
            <tr>
              <td>具体修改意见</td>
              <td colspan="4" align="center">
                <p>
                  <textarea id="specificcomments" cols="100" rows="50" ></textarea>
                </p></td>
            </tr>
        </table>
    </div>
    <div><button type="button" id="submit_psyj_button">保存评审意见</button></div>
</div>
</body>
</html>